#pragma once
#include "UserDefine.h"
class CUIStructLayer;
class CUICommon
{
public:
	CUICommon(void);
	~CUICommon(void);
	static CUIRect GetRect(long ptX1, long ptY1, long ptX2, long ptY2);
	static long GetWidth(long ptX1, long ptY1, long ptX2, long ptY2);
	static long GetHeight(long ptX1, long ptY1, long ptX2, long ptY2);
	static bool MakeRoundRect(GraphicsPath * pPath,float PercentageRounded,CUIRect rc);
	static CUIPoint LayerPtToWindowPt(long ptX, long ptY, CUIStructLayer * pLayer);
	static CUIPoint WindowPtToLayerPt(long ptX, long ptY, CUIStructLayer * pLayer);
	static bool HitTest(long ptX,long ptY,CUIRect * pUiRect);
};
